package com.jun.admin.core.model;


import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.experimental.Accessors;
import javax.persistence.Column;
import javax.persistence.Id;
import javax.persistence.Table;
import java.io.Serializable;
import java.time.LocalDateTime;

/**
* @author yuejun.li
* @since 2024-10-15
*/
@Data
@Accessors(chain = true)
@Table(name = "admin_organization")
@ApiModel(value = "AdminOrganization对象", description = "")
public class AdminOrganization implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty("机构id")
    @Id
    private String orgId;

    @ApiModelProperty("机构名称")
    @Column(name = "org_name")
    private String orgName;

    @ApiModelProperty("父机构id")
    @Column(name = "p_org_id")
    private String pOrgId;

    @ApiModelProperty("父机构名称")
    @Column(name = "p_org_name")
    private String pOrgName;

    @ApiModelProperty("机构层级")
    @Column(name = "org_level")
    private Byte orgLevel;

    @ApiModelProperty("机构层级编码")
    @Column(name = "level_code")
    private String levelCode;

    @ApiModelProperty("创建时间")
    @Column(name = "create_time")
    private LocalDateTime createTime;

    @ApiModelProperty("更新时间")
    @Column(name = "update_time")
    private LocalDateTime updateTime;


    public static final String ORG_ID = "orgId";

    public static final String ORG_NAME = "orgName";

    public static final String P_ORG_ID = "pOrgId";

    public static final String P_ORG_NAME = "pOrgName";

    public static final String ORG_LEVEL = "orgLevel";

    public static final String LEVEL_CODE = "levelCode";

    public static final String CREATE_TIME = "createTime";

    public static final String UPDATE_TIME = "updateTime";
}
